﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HTComics.Web.Admin
{
    public partial class Login : System.Web.UI.Page
    {
        private string _adminId = "HTCWAdmin";
        private string _admingPwd = "Dublin52";

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtLogin.Text == _adminId && txtPassword.Text == _admingPwd)
            {
                Session.Clear();
                Session["IsAdmin"] = true;
                Response.Redirect("Home.aspx");                                
            }
            else
            {
                lblError.Text = "Invalid Login / Password";
                lblError.Visible = true;
            }
        }
    }
}